add solution to class2/ex6