try to implement multi-thread mode