refactoring
reimplemented concurrency