I am having trouble looping a set of commands since they are a part of a promise. Now if a new event happens like user changes selection in the extension popup changes wont