Update function Patch 2