implemented rc4 algorithm