changed std dev routine back to what it was, the change i made before was wrong