Modified LocationTool function