passed averagedResults to js