Added reduce method