Added function rms (root mean square)