Finished a) and b) of Q1 in HW5