move js out of dashboard.js