more robust tracking algorithm