works if focus is on main panel