Finished problem2