Added code for visualization.