problem-6 solution is added