now it adds the selected element to the diagram