fixing bugs in first draft of noiseRegression2