ctd refactoring of qlmc