Alternative implementation for promises; still misses some cases in 2.3.3