let rec list_index n id=function
        | [] -> -1
        | h::t -> 
                if (h=id) then 
                        n
                else
                        list_index (n+1) id t