changing pool size & removing race condition