working with the register part