added various distance metrics