iteractive solution