reversion mean.cpp