RM test code