Extented funcion