populateDataMap refactored