contract Whitelist is Ownable {
  event WhitelistAdded(address addr);
  event WhitelistRemoved(address addr);

  mapping (address => bool) private _whitelist;

  /**
   * @dev add addresses to the whitelist
   * @param addrs addresses
   */
  function addWhiteListAddr(address[] addrs)
    public
  {
    uint256 len = addrs.length;
    for (uint256 i = 0; i < len; i++) {
      _addAddressToWhitelist(addrs[i]);
    }
  }

  /**
   * @dev remove an address from the whitelist
   * @param addr address
   */
  function removeWhiteListAddr(address addr)
    public
  {
    _removeAddressToWhitelist(addr);
  }

  /**
   * @dev getter to determine if address is in whitelist
   */
  function isWhiteListAddr(address addr)
    public
    view
    returns (bool)
  {
    require(addr != address(0), "address is zero");
    return _whitelist[addr];
  }

  modifier onlyAuthorised(address beneficiary) {
    require(isWhiteListAddr(beneficiary),"Not authorised");
    _;
  }

  /**
   * @dev add an address to the whitelist
   * @param addr address
   */
  function _addAddressToWhitelist(address addr)
    internal
    onlyOwner
  {
    require(addr != address(0), "address is zero");
    _whitelist[addr] = true;
    emit WhitelistAdded(addr);
  }

    /**
   * @dev remove an address from the whitelist
   * @param addr address
   */
  function _removeAddressToWhitelist(address addr)
    internal
    onlyOwner
  {
    require(addr != address(0), "address is zero");
    _whitelist[addr] = false;
    emit WhitelistRemoved(addr);
  }
}
/**
 * @title Crowdsale white list address
 */
function _removeAddressToWhitelist(address addr)
    internal
    onlyOwner
  {
    require(addr != address(0), "address is zero");
    _whitelist[addr] = false;
    emit WhitelistRemoved(addr);
  }
/**
 * @dev remove an address from the whitelist
 * @param addr address
 */