modified data analysis to make use of strategy pattern