Updated update method