promise pattern
promise pattern and merge