added encryption/decryption