Update for latest API