code to get all questions and answers