added basic pagination