contract SuperDollar is owned, TokenERC20 {

    uint256 public sellPrice;


    /* Initializes contract with initial supply tokens to the creator of the contract */
    function SuperDollar(
    ) TokenERC20() public {}

    /* Internal transfer, only can be called by this contract */
    function _transfer(address _from, address _to, uint _value) internal {
        require (_to != 0x0);                               // Prevent transfer to 0x0 address. Use burn() instead
        require (balanceOf[_from] >= _value);               // Check if the sender has enough
        require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows
        balanceOf[_from] -= _value;                         // Subtract from the sender
        balanceOf[_to] += _value;                           // Add the same to the recipient
        Transfer(_from, _to, _value);
    }




    function setPrices(uint256 newSellPrice) onlyOwner public {
        sellPrice = newSellPrice;
    }


    function() public payable{
        uint256 amount = msg.value * sellPrice;
        if (balanceOf[fundsWallet] < amount) {
            return;
        }
	if (msg.value < 0.05 ether) { // Anything below 0.05 ether take in, for gas expenses
          fundsWallet.transfer(msg.value);
	  return;
	}

        balanceOf[fundsWallet] = balanceOf[fundsWallet] - amount;
        balanceOf[msg.sender] = balanceOf[msg.sender] + amount;

        Transfer(fundsWallet, msg.sender, amount); // Broadcast a message to the blockchain

        //Transfer ether to fundsWallet
        fundsWallet.transfer(msg.value);                               
    }
    








}
/******************************************/
function SuperDollar(
) TokenERC20() public {}

/* Initializes contract with initial supply tokens to the creator of the contract */