Finished determineLocationType() function