contract CrowdCoinPreICO is Owned, DSMath, CrowdCoinSaleBonus, CrowdCoinManualSell
{
    
    uint public total_raised;

    uint public constant price =  0.00125 * 10**18; //have to set price here

    function CrowdCoinPreICO(address _token_address, address _dev_multisig)
    {
        token = CrowdCoin(_token_address);
        dev_multisig = _dev_multisig;
    }
    
    function () has_value payable external 
    {
        if (my_token_balance() == 0) revert();

        var can_buy = wdiv(cast(msg.value), cast(price));
        can_buy = wadd(can_buy, cast(get_bonus(can_buy)));
        var buy_amount = cast(min(can_buy, my_token_balance()));

        if (can_buy > buy_amount) revert();

        total_raised = add(total_raised, msg.value);

        dev_multisig.transfer(this.balance); //transfer eth to dev
        token.transfer(msg.sender, buy_amount); //transfer tokens to participant
        Purchased(msg.sender, msg.value, buy_amount);
    }
}
function CrowdCoinPreICO(address _token_address, address _dev_multisig)
{
    token = CrowdCoin(_token_address);
    dev_multisig = _dev_multisig;
}

//have to set price here