printing ip function