Updated for v8 of the API