add some visualization functions and more tests