added concurrency, bug fixes