modify some framework and add ui function