vis
add tests and visualization refactoring