adopt to latest API changes