add q-trimming and min-length for dmlt