add graph for error