some changes
moved visualization code to new file