add codes for payoff class and its inheritance