using RM constrain
minor corrections