treat slice efficiently