new path tracking algorithm