I forget what the lifecycle for getLocations() is -- does it get called more than once? you might want to cache the result.