added "bagof" build-in predicate - resolves #2