added minimal support for encoders