added nested routes and fixed adding posts and errors