Final version for HW4