moved position of tracking function live