moving location to getLocation to better comply with other methods in the API