Adding location detection.