added pagination - next, prev, updated js