comparator should be working, needs tests