ajax tweaks to add always promise function callback