refactor routes to use resources :posts