Added graph functionality in