rewrite a lot of DialectManager logic