updated index and show to share update logic
created partials for form and edit