Added visualization code