problem 6 done, refactoring now !