updated ajax callbacks to promises