removed unused code
getLocation method implemented