revised question 1 with some help from prof.