working with the recursion, AS parsing done