small refactor of hydration