improvements to comparison