how to use printing methods