for offline use
avoid running multiple threads at same time