export the update function directly