playing
introduction of promises when using beforeRender and afterRender