changed push_back for flags