improve interface of NewUIHandler