moved UI to ui.js