added encryption process
revised and refactored encryption process
revised comments