added aealgorithm()