added timeout, xor_string code