moved another function to graph