visualization pkg, untested, refactored