reworked the promise nest using jquery 1.8 then()s.