discounts + refactored pagination