extract a new method to reduce code complexity, fixed a deprecation warning, and enabled harvesting when in prod