added save profile image logic