adapt more to the new api