added reduceRight