refactoring + making the coupon selection work properly