modify the printing method