added code to handle more than one questions

added code to handle more than one questions