Working on the register writing