add support for encryption