finished JS routine separation on basic vis