Replace reduce with join