implement AET algorithm