Added a helper function for mpromise
Made the shared function in tasker controller to use promise