added global afterSet - corrected3