refactor questionhandler