function ReceiveBTC(address addr, uint value) public stopInEmergency beforeDeadline ICOactive onlyBy(BTCproxy){
        require(value >= MinimumInvestment());
        uint amount = amountToSend(value);
        if (amount==0){
            revert();
        }else{
            amountRaised += value;
            tokenReward.transfer(addr,amount);
            tokensSold = add(tokensSold,amount);
            ReceivedBTC(addr,value);
        }
    }