move questionnaire function to a another class