added tests, fixed logic issues
Merge pull request #126 from sjopet/simple_pager

added tests, fixed logic issues