finalizes HW5