the sixth question's solution