changed comparers to implement Comparer class