finished problem1