refactored flags to configuration