add dialect support

@robguthrie this is the only bug I might have found while reviewing code