the update function should kind of work