add visualization functions