Added support for flags