rewriting the settings engine