updated htm and js files to process 4 question types