Intergrated new tracking algorithm to main code