completed neighbor_iterator, made compilable, needs to be tested