adapt to new api version