use of vector for neighboring nodes