register plugin for ui initialization
some function separation