Restored previous version
Updated the pagination system