updated visualization helper functions, working through bugs