makes print method