wrote the prototype code, starting merging it with visualization.