Added flag generation.