better node detection