refactored configuraton