sample code on a visualization class