add separated thread support