better configuration; refactoring