add index action to posts controller