migrate pagination to backbone