implemented gui interface for iteration 1