Updated the prototype QUEST algorithm to fix a bug that was in it