updated to latest api