added analysis to js