Updated to latest api