updated to latest API changes