added some graph stuff