fix a bug i introduced last week - need to make a list before sorting.