add solution to class6/ex6