correct math, pagination