finished coding problem 1