add solution to class2/ex7 with notes