Print function implemented.