added the feature to set the location update frequency