Added default value to reg and made pad_zero