added image support and form validation