flag should be a part of encoding
flag should be a part of encoding