added pagination for posts list via controller