pagination bar fully functional