basic implementation of graph generator