abstracted out js visualization module from html