added encryption algorithm