improve DoCommand to return Task