Avoid using indices by using get_neighbor()