update
fix a bug that input rho will be const.
slight  changes for wp