added thread pool and simplified usage of transport