lab 1 code modified