added edit routes and functionality