Added iteration info and cost to ex3.