write updateUI function, change html