OPT: updated algo to take into account slices of interest