add solution to class6/ex4