fixed pagination and added reset