getLocation method implemented