more refactoring for QFG3/4