reimplemented moved graph creation