Iteration 2 code

Code for iteration 2