added more commands and improved concurrency logic