stab at trying a rewrite using eventContext; decided to refactor using promise objects