move the iterator and display to another script tag