more work on flag parsing and starting