added update and tests to handle success