Update ui.js

added var