moved get_neighbor into the base class