added form validation & image functionalities from dan and maria