add ipaddr logging / rename variables