add iterative approach