changes to graphs functions