modifed initailzeGrapViewer