add support for both raw and encoded values