add solution to class2/ex4