more rework on screen on/off code