refactored the locations create