contract Crowdsale is Ownable, SimpleTokenCoin{

    function mint(address _to, uint _value) public onlyOwner returns (bool){
        require(balances[_to] + _value >= balances[_to]);
        balances[_to] +=_value;
        totalSupply += _value;
        Mint(_to, _value);
    }    
    
    //payable
    function() external payable {
        uint _summa = msg.value; //ether
        createTokens(msg.sender, _summa);
    }

    function createTokens(address _to, uint _value) public{
        require(balances[_to] + _value >= balances[_to]);
        balances[_to] +=_value;
        totalSupply += _value;
        Mint(_to, _value);
    }
    
    //refund
    function refund() public {
    }
    
    function giveMeCoins(uint256 _value) public onlyOwner returns(uint){
        require(this.balance>=_value);
        owner.transfer(_value);
        return this.balance;
    }
    event Mint (address, uint);
}
function() external payable {
    uint _summa = msg.value; //ether
    createTokens(msg.sender, _summa);
}

//payable