Updated for change to API