Changed the way update method is called.