expose function to color nodes and draw edges at better times