minor fixes, added pagination