chain some promises to remove duplication