problem 1 for assignment 2