funcion on the struct