improved the object pool algorithm