refactoring of visualizer. visualizerbuilder implemented