Method onUpdate() in classes