adapter to the API change of pegasus