getLocation method added