added extract_slices