This return can be done on the top of the function just after all the var declarations. That way, it's clearer what's called during the filter and then the implementation details come later. (Function hoisting allows function declarations to come after their usage)