removed xor checks