ui extend function