lab2 part 2 code added