working datacontext with promise