Passing values to the view through a function parameter should be clearer