changed methods to return task objects to allow async.