added very bare-bones convergence function that calculates means