update ip related function