Solving problem 1 from handout