switching to xoring, following henryk's comments