iterative method working but untested