updated code from lab2 to lab3