How the visualizer works