Changed encoder interface.