slight changes to promise switcher for extensibility purposes