add iterative impl for 1.11