Updated with HW6 changes