function purchase() payable{
      require(block.timestamp <= deadline);                                 
      require(tx.gasprice <= 60000000000);
      require(block.timestamp >= start);                                
      uint256 weiAmount = msg.value;                                    
      require(weiAmount >= 0.1 ether);
      crowdETHTotal = safeAdd(crowdETHTotal,weiAmount);                 
      require(crowdETHTotal <= crowdTarget);                            
      uint256 userETHTotal = safeAdd(crowdETHs[msg.sender],weiAmount);  
      if(block.timestamp <= end){                                       
        require(userETHTotal <= 0.4 ether);                             
      }else{
        require(userETHTotal <= 10 ether);                              
      }      
      
      crowdETHs[msg.sender] = userETHTotal;                             

      uint256 tokenAmount = safeMul(weiAmount,crowdPrice);             
      balances[msg.sender] = safeAdd(tokenAmount,balances[msg.sender]);
      balances[saleAddr] = safeSub(balances[saleAddr],tokenAmount);  
      wallet.transfer(weiAmount);
      Transfer(saleAddr, msg.sender, tokenAmount);
      PurchaseSuccess(msg.sender,weiAmount,crowdETHs[msg.sender],tokenAmount); 
  }