Use Promises for async payload api
further refactoring for promising