moved all posts into query set and applied pagination