print method implemented