sorting cars and teams