change the pool from an array to a thead-safe hash