handle exact and similarity for structure