Refactor code with updateQuestion() method