added pagination to posts