use pagination class for pages. has a problem unsolved, page number is wrong