implements ObjectPool class