added image upload functionality