adding pagination & ajax for serach and sorting