Added a function to update the output value