adding the update funcionality