make necessary changes to support newer API