implemented dividing sessions into pages