added promise pattern source