Current working version with updated mean predictor