optimize the location feature