Fixed lab3 code.