add support for flags to server command