update switchNum popup function