update ajax-logic