iteration and xml output working