added conditional for the base template for visualization.