Added code for pagination and added a test module