tried to improve location tracking. still not perfect...