added location handling and tracking