add code for visualization