Lastest Code of ui.js