added rms, test and add flow tomorrow