Dumped the code into function named fetch_questions.