added page method
refactor of page method
added pagination