added functionality to handle questions with images