Using Events, Promises, and Loops