merge single-use function into only caller