added insertclassdiagram function