A basic working version with visualizer