finished 7-1,2,3 example code