added features to encrypt