- fixed the very slow graph creation method