Algorithm cars threads