more functions for the graph