changed routing and posts controller