change ip reading function