add RMS plots; this code in desperate need of drying off