moved js to visual.js