edited colorNode, markEdge and other methods