add queue to enable multi-thread