update cv function to use new API