Add problem 6 solution