new conditional encoding support