modify print method