updated configuration loading
another refactoring