pagination updated and search bug corrected