big refactoring of quest