lab4 fixes