cleaned up routes and implemented update