Added graphToStack
addToGraph compiles