updated to use new API