add ClearAllRegisters function