adding my macro for the RMS plots and the Yue Shi's updates