editDiagram revised and working