Removed some side effects to simply graph_values function