made a change to graph and graph window that moves the frame command in another function