tried to centralize popup setting but failed