partially optimized reduce
hena 18pre