Adapted to using Lists instead of Sets