Beginning of work with pagination