updating to the latest api