some modification add graph copy capability