Revert previous change, exported function there for testing