support for more complex encoding