Declare update function before it is used (required for Playground)