added plaintext fallback option