Adding setReg and getReg