io reduce
combine with Beaver's fix