Finished problem5