adding cv utility function