refactored buildSettings