ip function removal + indentation fix