multiple conditions in if in register