now able to set flags, exit helper