begin to write register module