shortened the print method