improvements to comparer class