single case for encode/decode
improved handling of single parameter