refactored async waterfall pattern into series pattern