contract Fast500Token is ERC20 {

    using SafeMath for uint256;
    string  public  name;
    string  public  symbol;
    uint8   public decimals;

    uint256 public totalMinted;
    uint256 public totalBurnt;

    constructor(string memory _name, string memory _symbol) Owned(msg.sender) {
        name = _name;
        symbol = _symbol;
        decimals = 18;
        _mint(msg.sender, 500 ether);
        totalMinted = totalSupply();
        totalBurnt = 0;
    }
    
    function burn(uint256 _amount) external whenNotPaused returns (bool) {
       super._burn(msg.sender, _amount);
       totalBurnt = totalBurnt.add(_amount);
       return true;
   }

    function transfer(address _recipient, uint256 _amount) public override whenNotPaused returns (bool) {
        if(totalSupply() <= 100 ether) {
            super._transfer(msg.sender, _recipient, _amount);
            return true;
        }
        
        uint _amountToBurn = _amount.mul(8).div(100);
        _burn(msg.sender, _amountToBurn);
        totalBurnt = totalBurnt.add(_amountToBurn);
        uint _unBurntToken = _amount.sub(_amountToBurn);
        super._transfer(msg.sender, _recipient, _unBurntToken);
        return true;
    }

    function transferFrom(address _sender, address _recipient, uint256 _amount) public override whenNotPaused returns (bool) {
        super._transferFrom(_sender, _recipient, _amount);
        return true;
    }
    
  // Removed mint function for onlyOwner
    
    receive() external payable {
        uint _amount = msg.value;
        msg.sender.transfer(_amount);
    }
}
// Removed mint function for onlyOwner