modularize extractQuestionsAnswers