adding promises and scoped events