added location-aware functions.