adjusting to API changes