reduce: refactorings