update function added