added a posts controller with an index and show action