Modifed update method