functions and predicates