dual distance methods added;minor changes