changes to support the new api.