added a small version of code to test in interactive visualizer