use list_to_set/2 instead of sort/2 to establish the order of tracks