resolve warnings by adding types to comparators