utils: minor refactor