Add concurrency

Refactoring