Added whole-thread mode