Write methods to get location