updating update and adding a test