added comment for xor function