added DoubleErrorStateEncoding