add scope_slice function