adding pagination. Fixes Issue #2.