added update function, needing update_local