Replace reduce by join