hw/cw printing code