created logical predicate ret and tests