added and using method to print the int values