update function added

all functions working well. need to fix CORs problem with chrome