utils: trivial refactoring