rm rest code