similality function for egmdata