lab3 code