read flags from command line