fixing the slices functions