fix cpv and add test