fixed run task to return Promise