move visualization to separate thread