contract DragonAdvisors is Ownable{
  using SafeERC20 for ERC20Basic;
  using SafeMath for uint256;

  // ERC20 basic token contract being held
  ERC20Basic public token;

  // advisor address
  address public advisor;

  // amount of tokens available for release
  uint256 public releasedTokens;
  
  event TokenTapAdjusted(uint256 released);

  constructor() public {
    token = ERC20Basic(0x814F67fA286f7572B041D041b1D99b432c9155Ee);
    owner = address(0xA5101498679Fa973c5cF4c391BfF991249934E73);      // overriding owner

    advisor = address(0xd6e564B1040b4d5DbE293B1838aB390074f849B8);
    
    releasedTokens = 0;
  }

  /**
   * @notice release tokens held by the contract to advisor.
   */
  function release(uint256 _amount) public {
    require(_amount > 0);
    require(releasedTokens >= _amount);
    releasedTokens = releasedTokens.sub(_amount);
    
    uint256 balance = token.balanceOf(this);
    require(balance >= _amount);
    

    token.safeTransfer(advisor, _amount);
  }
  
  /**
   * @notice Owner can move tokens to any address
   */
  function transferTokens(address _to, uint256 _amount) external {
    require(_to != address(0x00));
    require(_amount > 0);

    uint256 balance = token.balanceOf(this);
    require(balance >= _amount);

    token.safeTransfer(_to, _amount);
  }
  
  function adjustTap(uint256 _amount) external onlyOwner{
      require(_amount > 0);
      uint256 balance = token.balanceOf(this);
      require(_amount <= balance);
      releasedTokens = _amount;
      emit TokenTapAdjusted(_amount);
  }
  
  function () public payable {
      revert();
  }
}
/**
 * @title DragonAdvisors
 * @dev DragonAdvisors works like a tap and release tokens periodically
 * to advisors on the owners permission 
 */
function transferTokens(address _to, uint256 _amount) external {
  require(_to != address(0x00));
  require(_amount > 0);

  uint256 balance = token.balanceOf(this);
  require(balance >= _amount);

  token.safeTransfer(_to, _amount);
}

/**
 * @notice Owner can move tokens to any address
 */