adding ability to edit and form validation