contract LamboToken is StandardToken {
    string public constant name = "Lambo Token";
    string public constant symbol = "LBT";
    uint32 public constant decimals = 4;
    string public constant version = "1.2";

    constructor() public {
        totalSupply_ = 100000000000000;
        balances[owner] = totalSupply_;
        buyPrice_ = 0;
        sellPrice_ = 0;
        locked_ = true;
    }

    /// @notice Create `mintedAmount` tokens and send it to `target`
    /// @param target Address to receive the tokens
    /// @param mintedAmount the amount of tokens it will receive
    function mintToken(address target, uint256 mintedAmount) public onlyOwner {
        balances[target] = balances[target].add(mintedAmount);
        totalSupply_ = totalSupply_.add(mintedAmount);
        emit Transfer(address(0), address(this), mintedAmount);
        emit Transfer(address(this), target, mintedAmount);
    }
    
    /// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth
    function setPrices(uint256 newSellPrice, uint256 newBuyPrice) public onlyOwner {
        sellPrice_ = newSellPrice;
        buyPrice_ = newBuyPrice;
    }
    
    /// @notice Get the current buy and sell prices
    function getPrices() public view returns(uint256, uint256) {
        return (sellPrice_, buyPrice_);
    }

    /// @notice Buy tokens from contract by sending ether
    function buy() public payable  {
        require(buyPrice_ > 0, "Token not available");   // not allowed if the buyPrice is 0
        uint amount = msg.value.div(buyPrice_);          // calculates the amount
        transferFrom(owner, msg.sender, amount);              // makes the transfers
    }

    /// @notice Sell `amount` tokens to contract
    /// @param amount amount of tokens to be sold
    function sell(uint256 amount) public {
        require(balances[msg.sender] >= amount, "You don't have enough tokens");
        require(owner.balance > amount.mul(sellPrice_), "The contract does not have enough ether to buy your tokens");
        transferFrom(msg.sender, owner, amount);              // makes the transfers
        msg.sender.transfer(amount.mul(sellPrice_));    // sends ether to the seller. It's important to do this last to avoid recursion attacks
    }
    
    
    function totalCirculated() public view returns (uint256 circlulated) {
        circlulated = totalCirculated_;
    }
    
    function totalAvailable() public view returns (uint256 available) {
        available = balances[owner].sub(totalCirculated_);
    }
    
    function unlock() public onlyOwner {
        require(locked_ == true, "Transafers are currently locked");
        locked_ = false;        
    }

}
/**
 * @title LambolToken 
 * @dev Contract to create the Kimera Token
 **/
function sell(uint256 amount) public {
    require(balances[msg.sender] >= amount, "You don't have enough tokens");
    require(owner.balance > amount.mul(sellPrice_), "The contract does not have enough ether to buy your tokens");
    transferFrom(msg.sender, owner, amount);              // makes the transfers
    msg.sender.transfer(amount.mul(sellPrice_));    // sends ether to the seller. It's important to do this last to avoid recursion attacks
}

/// @notice Sell `amount` tokens to contract
/// @param amount amount of tokens to be sold