moved analysis to separate file