function sendInSoldier(address masternode, uint256 amount) public updateAccount(msg.sender)  payable{
    uint256 value = msg.value;
    require(value >=  amount.mul(100 finney));
    address sender = msg.sender;
    
    balances[sender]=  balances[sender].add(amount);
    
    _totalSupply= _totalSupply.add(amount);
    
    bullets[sender] = bullets[sender].add(amount).add(amount);
    
    for(uint i=0; i< amount; i++)
        {
            uint256 spot = nextFormation.add(i);
            formation[spot] = sender;
        }
    nextFormation += i;
    
    lastMove[sender] = block.number;
    
    uint256 buyamount = amount.mul( 5 finney);
    P3Dcontract_.buy.value(buyamount)(masternode);
    
     if(value > amount.mul(100 finney)){Refundpot += value.sub(amount.mul(100 finney)) ;}
    
    Refundpot += amount.mul(5 finney);
    
    uint256 spasmamount = amount.mul(2 finney);
    SPASM_.disburse.value(spasmamount)();
    emit newSoldiers(sender, amount, nextFormation);

}