Update function added