spec for problem6
Solve problem 6