updated for HW4