apply pagination to topics