building graph