buildGraph added