Updated code for trends_visualizer to still work