Migrate to the new API