set magic for ajax