print method works