fixing the loops
Merge pull request #54 from 18F/fix_pagnation

fixing the loops