fixed import bug, where the algorithm run in the UI thread.