updated nested forms and routes and add javascript