improvements to compare