added notes on types, constraints
fmt
added test
fixed handling of predicates