tmp commit
modified to enable multi thread running