refactor deep.promise