Created seperate uploadProfileImage() function