layout refresh after model update
calling the algorithm in separate thread and making it cancellable