slight change to visualization code