visualization code separate