modified routes and posts controller