added common functions for the dissimilarity representation