added some ui js code