graph convertion method added.