implemented the register rest