before printing