New update function added