command line flags appear to work, but it's a mess