Completed problem2.