added default vaulues for per_page and page
completed pagination functionality