'get_neighbors' implementation