improve equals match + add simple test