updated to latest API, except unit tests