Final working result for HW3