Track algorithm