Updated to match HW3 requirements