figure out IP if none provided