Update to use new APIs