refactored object pool