improve restore ip addresses solution