completed update method and update tests