stop using window.Promise and do something responsible