adjusted example code to revised class cofactions