added lab 3 code