lots more location-related helper functions