added decryption function