trying to get deffered promises to work