added handling for location updates and modified database create script