add code for lab 7