add models.h and is_directed