Sample code for lab 7