working on visualizer and fixed bug