scala: graph