ex.6 Iteration working