doQuest function added