constrain on r2n
swap order of r2n and p in ui