move around some code to separate creating and populating listbox