add support for flags