update ajax method