fixed typo, fixed some bug, added pagination