refactoring of coupon class