add docstring to latchregister