implement iterativ algorithm to AFZ