#25 add configuration logic, and use generic predicate and jdk comparator interfaces