change from dist to disteval y distancefactory to distance