modify quest function