add enclosing anonymouse function so we can still use the '$' shortcut