try a better way to detect node