note to use promises
dreduce