use reduce, and other updates