still need a reduction function