implementing pagination - wip