updated the implementation of local locations.