renamed "function" parameter to "operation:" to avoid confusion