rewrote class to create a paged navigation