refactored demographic and word analyis model