add pagination to UI