refactor QType