added ajax to update