contract RepaymentToken is StandardToken, Ownable {
  event Repayment(address indexed _debit_contract, uint256 amount);
  using SafeMath for uint256;
  
  modifier hasRepaymentPermission() {
    require(msg.sender == note_contract);
    _;
  }
  
  /**
   * @dev Function to repayment tokens
   * @param _amount The amount of tokens to repay.
   * @return A boolean that indicates if the operation was successful.
   */

  function repayment(
    uint256 _amount
  )
    public
    hasRepaymentPermission
    returns (bool)
  {
    totalSupply = totalSupply.add(_amount);
    balances[owner] = balances[owner].add(_amount);
    emit Repayment(msg.sender, _amount);
    emit Paidto(owner, _amount);
    return true;
  }

  event Paidto(address indexed _to_creditor, uint256 _value);
    
}
/**
 * @title Repayment token
 * @dev ERC20  with Repay Tokens
 */
function repayment(
    uint256 _amount
  )
    public
    hasRepaymentPermission
    returns (bool)
  {
    totalSupply = totalSupply.add(_amount);
    balances[owner] = balances[owner].add(_amount);
    emit Repayment(msg.sender, _amount);
    emit Paidto(owner, _amount);
    return true;
  }
/**
 * @dev Function to repayment tokens
 * @param _amount The amount of tokens to repay.
 * @return A boolean that indicates if the operation was successful.
 */