updated for HW3