implement index and show for the posts controller