refactor to code to allow for the same function to handle updating the visualization with new data, plus dummy timer to test it all out