generalized push/pop scope