add the init ui and add some function