Row and Col at lines 50 & 51 should remain the same.
Line 107 should remain the way it is. The loop checks the top, bottom, left, and right neighbors of the current node.
Oh, that wasn't what it sounded like:
Thanks to technical issues it appeared as if this thread had no replies (i.e., it looked like an empty thread.) Not knowing any better I replied to it to see if I could report it, since usually reporting a thread with only one post removes the thread entirely.
After posting that reply I wasn't even able to delete my own! My apologies. I hope I didn't prevent you from finding help.