use Cmd struct for options instead of map