adapt to API changes