substr to slice