self print method was implemented.