moved opts before the slice