use functions, not classes

Also Selection is reverted to only use predicates