refactor qlmc