and added reduce and reduceright