rewriting the settings window