added support for a filter function on retrieval
changed .exec argument order so it is the same as .retrieve