a few extensions to predicates.lua