added decryption for history and detailedHistory