class for reduction, logging
fixed logging