prepare register