made some changes to the register part