refactored populatecontrols