added the beginning of decryption stuff