Use lists instead of sets to maintain order