change mathod of determining local address