Added the graph and button press feature