upgrade api to v2