added encoded flag