Added graph functionality