update for ajax