added getLocation method