add cmd thread