refactored location
image uploads to database