added code to handle more than one questions