add solution to class2/ex2