implemented tri-encryption