Replaced es5 filter function with shim