add solution to class8/ex2