all functionality for iteration 1