returns a list of tuples of ref,val,path