added problem7 solution