get rid of `ui_generator` function.