get IP function moved