- Switched back to using a promise with when
- Created "andWhen" function