removed unnecessary variable declarations for promises