anchor.diff:                      x.node.Equals(o.node) && x.range = o.range
                   | _ -> false
   
  -    type LoadTask(factory : TaskFactory, data : ILodData, node : LodDataNode, ct : CancellationToken, pool : GeometryPool, activate : GeometryRef -> unit, deactivate : GeometryRef -> unit) =
  -        let cancel = new CancellationTokenSource()
  -        let mutable killed = 0
  -        let mutable refCnt = 1
  -        let mutable running = true
  -     
  -        let task =
  -            let runner = 
  -                async {
  -                    do! Async.Sleep 0
  -
  -                    let! geometry = data.GetData(node)
  -                    do! Async.OnCancel(fun () -> pool.Remove geometry |> ignore) |> Async.Ignore
  -                   
  -                    let range = pool.Add(geometry) 
  -                    
  -                    let res = { node = node; geometry = geometry; range = range }
  -
  -                    try
  -                        return res
  -                    finally
  -                        running <- false
  -                        if refCnt > 0 then activate res
  -                        else deactivate res
  -                }
  -            Async.StartAsTask(runner, cancellationToken = cancel.Token)
  -
  -
  -        member x.Deactivate() =
  -            if killed = 1 then failwith "cannot deactive killed LoadTask"
  -
  -            let newCnt = Interlocked.Decrement(&refCnt)
  -            if newCnt = 0 then
  -                if not running then 
  -                    if task.IsCanceled |> not then
  -                        deactivate task.Result
  -
  -                    false
  -                else
  -                    match task.Status with
  -                        | TaskStatus.WaitingForActivation | TaskStatus.WaitingToRun ->
  -                            printfn "aborting the evil that men do"
  -                            cancel.Cancel()
  -                            true
  -                        | _ ->
  -                            false
  -            else
  -                false
  -
  -
  -        member x.Activate() =
  -            if killed = 1 then failwith "cannot active killed LoadTask"
  -
  -            let newCnt = Interlocked.Increment(&refCnt)
  -            if newCnt = 1 then
  -                if not running then 
  -                    if task.IsCanceled |> not then
  -                        activate task.Result
  -
  -
  -        member x.Kill(cont : GeometryRef -> unit) =
  -            if Interlocked.Exchange(&killed, 1) = 0 then
  -                cancel.Cancel()
  -
  -                let killNow (t : Task<_>) =
  -                    cont t.Result
  -
  -                if task.IsCompleted then cont task.Result
  -                else task.ContinueWith killNow |> ignore
  -
  -    module LoadIntoPool =
  -        
  -        let runWithCompensations (outRef : ref<'a>) (xs : list<('a -> Async<'a>) * ('a -> unit) >) =  
  -            let rec doWork xs disposables =
  -                async {
  -                    match xs with
  -                        | (m,comp)::xs ->
  -                                let resultValue = ref None
  -                                let! d = 
  -                                    Async.OnCancel(fun () -> 
  -                                        let r = !resultValue
  -                                        match r with
  -                                            | Some (v,(d:IDisposable)) -> 
  -                                                comp v
  -                                                d.Dispose()
  -                                            | None -> ()
  -                                    )
  -                                let! r = m !outRef
  -                                do resultValue := Some (r,d); outRef := r
  -                                return! doWork xs (d :: disposables)
  -                        | [] -> return () 
  -                }
  -            doWork xs []
  -
  -        let load (data : ILodData) (node : LodDataNode) (pool : GeometryPool) = 
  -            async {
  -                let! geometry = data.GetData(node)
  -                do! Async.OnCancel(fun () -> Log.line "rollback, remove from pool."; pool.Remove geometry |> ignore) |> Async.Ignore
  -                let range = pool.Add(geometry) 
  -                    
  -                return { node = node; geometry = geometry; range = range }
  -            }
  -
  -    type LoadTaskasdasd(data : ILodData, node : LodDataNode, ct : CancellationToken, pool : GeometryPool, activate : GeometryRef -> unit, deactivate : GeometryRef -> unit) =
  -        let mutable result = None
  -        let mutable refCnt = 1
  -
  -        let run =
  -            async {
  -                let! geometry = data.GetData(node)
  -                do! Async.OnCancel(fun () -> pool.Remove geometry |> ignore) |> Async.Ignore
  -                let range = pool.Add(geometry) 
  -                    
  -                return { node = node; geometry = geometry; range = range }
  -            }
  -
  -        member x.Run() =
  -            let r = Async.RunSynchronously run
  -            result <- Some r
  -            activate r
  -
  -        member x.Deactivate() = 
  -            if Interlocked.Decrement(&refCnt) = 0 then
  -                match result with
  -                    | None -> ()
  -                    | Some v -> deactivate v
  -
  -        member x.Activate() = 
  -            if Interlocked.Increment(&refCnt) = 1 then
  -                match result with
  -                    | Some r -> activate r
  -                    | None -> failwith ""
  -
  -        member x.Kill cont = result |> Option.iter cont
  -
  -    type LoadResult = ref<Choice<CancellationTokenSource,GeometryRef>>
  -    type LoadResultNew = CancellationTokenSource * ref<IndexedGeometry * GeometryRef>
  -
  -    type PointCloudHandler(node : Sg.PointCloud, view : IMod<Trafo3d>, proj : IMod<Trafo3d>, viewportSize : IMod<V2i>, progress : Progress, runtime : IRuntime) =
  +
  +    type LoadResult = CancellationTokenSource * ref<IndexedGeometry * GeometryRef>
  +
  +    type PointCloudHandler(node : Sg.PointCloud, view : IMod<Trafo3d>, proj : IMod<Trafo3d>, viewportSize : IMod<V2i>, progress : LodProgress.Progress, runtime : IRuntime) =
           let cancel = new System.Threading.CancellationTokenSource()
   
           let pool = GeometryPool.createAsync runtime
  
positive.code: [<AutoOpen>]
  module ``PointCloud Sg Extensions`` =
  
      module Sg = 
          type PointCloud(data : ILodData, config : PointCloudInfo, progress : Progress) =
              interface ISg
  
negative.code:                 }
  
              let removeFromPool (ig,r) = 
                  pool.Remove ig |> ignore
  
              let addToRender (ig,r) =
  