test code for visualization