Created separate method for printing results