move dash js code into dash.js