completed update tests and update  method