replace scheduler thread with main thread scheduler