refactor loadSettings