moved flag name retrieval to reader