backwards compatible filter() and map() by monkey patching