added pagination to posts index