worked on pagination in functions.php