Updated to match HW4 instructions