demographic data fix - refactor