adaptation for ajax