fixed typo and Promise return type