updated delete and form validation