simplify ui.js