replace specification interface by using Predicate