Completed TODO 6 for HW 2