iterative flood fill