add solution to class3/ex2