Implemented set_register