Aeff function fixed