add some register code