added tests, a some what better idea on using predicate as types.