add location detection, fix search param