extracted mode to settings