rm code in rough state