implemented slicing